/**
 * Copyright &copy; 2012-2016 <a href="https://github.com/thinkgem/jeesite">JeeSite</a> All rights reserved.
 */
package com.thinkgem.jeesite.modules.shop.entity;

import com.thinkgem.jeesite.modules.sys.entity.User;
import javax.validation.constraints.NotNull;

import org.hibernate.validator.constraints.Length;

import com.thinkgem.jeesite.common.persistence.DataEntity;

/**
 * 收货地址Entity
 * @author 马勇强
 * @version 2019-05-15
 */
public class Home extends DataEntity<Home> {
	
	private static final long serialVersionUID = 1L;
	private User user;		// 用户id
	private String address;		// 收货地址
	private String tel;		// 收货电话
	private String defalut; //状态 是否默认地址
	
	public Home() {
		super();
	}

	public Home(String id){
		super(id);
	}

	@NotNull(message="用户id不能为空")
	public User getUser() {
		return user;
	}

	public void setUser(User user) {
		this.user = user;
	}
	
	@Length(min=0, max=255, message="收货地址长度必须介于 0 和 255 之间")
	public String getAddress() {
		return address;
	}

	public void setAddress(String address) {
		this.address = address;
	}
	
	@Length(min=0, max=255, message="收货电话长度必须介于 0 和 255 之间")
	public String getTel() {
		return tel;
	}

	public void setTel(String tel) {
		this.tel = tel;
	}
	@NotNull(message="默认地址不能为空")
	public String getDefalut() {
		return defalut;
	}

	public void setDefalut(String defalut) {
		this.defalut = defalut;
	}
	
}